package g.m.springcloud.controller;

import g.m.springcloud.entities.User;
import g.m.springcloud.service.UserService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class UserController {

    @Resource
    private UserService userService;

    @PostMapping(value = "/update")
    public void update(@RequestBody User user){
        userService.update(user);
    }

}
